<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"></meta>
    <title>Title</title>
    <style>
        @page{
            size: ${printTemp.width}cm ${printTemp.height}cm;
            margin:0;
            padding: 0;
        }
        html,body{
            font-family: STFangsong, serif;
            padding:0;
            margin:0;
        }
        .base-print-frame {
            position: relative;
            border: 0px solid #333;
            background-size: 100% 100%;
            background-repeat: no-repeat;
        }
    </style>
</head>
<body>
<div class="base-print-frame" style="width:${printTemp.width}cm;height:${printTemp.height}cm">
    <img
        style="position:absolute;width:100%;height:100%;z-index:1;left:0;top:0"
        src="${printTemp.backImg}"
    />
    <#list printTempFields as f>
        <#if f.type =="text">
            <div style="
                    z-index:2;
                width:${f.width}px;
                height:${f.height}px;
                position:absolute;
                font-size:${f.fontSize}px;
                font-weight:${f.fontWeight};
                top:${f.fieldTop}px;
                left:${f.fieldLeft}px;">${f.fieldValue}
            </div>
        </#if>
        <#if f.type =="img">
            <div style="
                z-index:2;
                width:${f.width}px;
                height:${f.height}px;
                position:absolute;
                font-size:${f.fontSize}px;
                font-weight:${f.fontWeight};
                top:${f.fieldTop}px;
                left:${f.fieldLeft}px;
                background-image:url(${f.fieldValue});
                background-repeat:no-repeat;
                background-size:100% 100%;"></div>
        </#if>
        <#if f.type =="barcode">
            <div style="
                width:170px;
                height:${f.height}px;
                z-index: 8;
                position:absolute;
                font-size:${f.fontSize}px;
                font-weight:${f.fontWeight};
                top:${f.fieldTop}px;
                left:${f.fieldLeft}px;
                background-image:url('${f.fieldValue}');
                background-repeat:no-repeat;
                background-size:100% 100%;"></div>
        </#if>
    </#list>
</div>
</body>
</html>